import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { NavigationContainer } from '@react-navigation/native';

// 导入组件
import MainRouter from './src/mainRouter';
import WelcomeScreen from './src/pages/welcome';
import AgreementScreen from './src/pages/account/agreement';
import LoginScreen from './src/pages/account/login';
import LoginPasswordScreen from './src/pages/account/loginPassword';
import RegistryScreen from './src/pages/account/registry';

// import HomeScreen from './src/pages/home';

// import CategoryScreen from './src/pages/category';
import SearchHistoryScreen from './src/pages/category/searchHistory';
import GoodsListScreen from './src/pages/category/goods';
import GoodsDetailScreen from './src/pages/category/goods/detail';

// import CartScreen from './src/pages/cart';

// import ProfileScreen from './src/pages/profile';
import AddressListScreen from './src/pages/profile/address';
import AddressCreateScreen from './src/pages/profile/address/create';
import FavScreen from './src/pages/profile/fav';
import HistoryScreen from './src/pages/profile/history';
import OrderScreen from './src/pages/profile/order';

const Stack = createNativeStackNavigator();

function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator initialRouteName="MainRouter">
        <Stack.Screen
          name="MainRouter"
          component={MainRouter}
          options={{ headerShown: false }}
        />

        <Stack.Screen
          name="WelcomeScreen"
          component={WelcomeScreen}
          options={{ headerShown: false }}
        />
        <Stack.Screen
          name="AgreementScreen"
          component={AgreementScreen}
          options={{ headerShown: false }}
        />
        <Stack.Screen
          name="LoginScreen"
          component={LoginScreen}
          options={{ headerShown: false }}
        />
        <Stack.Screen
          name="LoginPasswordScreen"
          component={LoginPasswordScreen}
          options={{ headerShown: false }}
        />
        <Stack.Screen
          name="RegistryScreen"
          component={RegistryScreen}
          options={{ headerShown: false }}
        />
        {/* <Stack.Screen   name="HomeScreen"  component={HomeScreen} options={{ headerShown: false }} /> */}
        {/* <Stack.Screen   name="CategoryScreen"  component={CategoryScreen} options={{ headerShown: false }} /> */}
        <Stack.Screen
          name="SearchHistoryScreen"
          component={SearchHistoryScreen}
          options={{ headerShown: false }}
        />
        <Stack.Screen
          name="GoodsListScreen"
          component={GoodsListScreen}
          options={{ headerShown: false }}
        />
        <Stack.Screen
          name="GoodsDetailScreen"
          component={GoodsDetailScreen}
          options={{ headerShown: false }}
        />
        {/* <Stack.Screen   name="CartScreen"  component={CartScreen} options={{ headerShown: false }} /> */}
        {/* <Stack.Screen   name="ProfileScreen"  component={ProfileScreen} options={{ headerShown: false }} /> */}
        <Stack.Screen
          name="AddressListScreen"
          component={AddressListScreen}
          options={{ headerShown: false }}
        />
        <Stack.Screen
          name="AddressCreateScreen"
          component={AddressCreateScreen}
          options={{ headerShown: false }}
        />
        <Stack.Screen
          name="FavScreen"
          component={FavScreen}
          options={{ headerShown: false }}
        />
        <Stack.Screen
          name="HistoryScreen"
          component={HistoryScreen}
          options={{ headerShown: false }}
        />
        <Stack.Screen
          name="OrderScreen"
          component={OrderScreen}
          options={{ headerShown: false }}
        />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

export default App;
